package Java7_Concurrency_Cookbook.thread_synchronized_base.wait_notify;

public class Producer implements Runnable {

    private EventStorage storage;

    public Producer(EventStorage storage) {
        this.storage = storage;
    }

    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            try {
                storage.set();
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }
}
